#include "gpio.h"
#include "ui_gpio.h"
#include <QDebug>
#include <QObject>
#include <QUdpSocket>


GPIO::GPIO(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::GPIO)
{
    ui->setupUi(this);
    system("himm  0x112F0054   0");
    system("himm  0x120D7400  0x10");
    system("himm  0x120D7240  0");

    system("himm  0x112F004C   0");
    system("himm  0x120D7400  0x04");
    system("himm  0x120D7210  0");

    ui->pushButton->move(400,300);
    ui->pushButton_2->move(400,400);

    ui->pushButton_3->move(1000,300);
    ui->pushButton_4->move(1000,400);

    ui->pushButton_5->move(400,550);
    ui->pushButton_6->move(400,650);

    ui->pushButton_7->move(1000,550);
    ui->pushButton_8->move(1000,650);



}

GPIO::~GPIO()
{
    delete ui;
}

void GPIO::on_pushButton_released()
{
     system("himm  0x112F0054   0");
     system("himm  0x120D7400  0x10");
     system("himm  0x120D7240  0x10");
}

void GPIO::on_pushButton_2_released()
{
     system("himm  0x120D7240  0");
}


//open 7_2
void GPIO::on_pushButton_3_released()
{
    system("himm  0x112F004C   0");
    system("himm  0x120D7400  0x04");
    system("himm  0x120D7210  0x04");
}

//close 7_2
void GPIO::on_pushButton_4_released()
{
    system("himm  0x120D7210  0");
}


//open 7_5
void GPIO::on_pushButton_5_released()
{

}


//close 7_5
void GPIO::on_pushButton_6_released()
{

}


//open  7_7
void GPIO::on_pushButton_8_released()
{

}


//close 7_7
void GPIO::on_pushButton_7_released()
{

}
